using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using log4net;
using log4net.Config;
using System.IO;


public partial class borrar : System.Web.UI.Page
{
    private static ILog logger;
    protected void Page_Load(object sender, EventArgs e)
    {
        //try
        //{
        //    int a = 1, b=0;


        //    a = a / b;
        //}
        //catch (Exception)
        //{

        //    throw;
        //}

        //InitializeLogger();
        //LogString("Sample Text for Log File");
        
    }


    #region Logging Functions
    static void LogString(string stringToLog)
    {
        logger.Info(stringToLog);
    }

    private static void InitializeLogger()
    {
        if (log4net.LogManager.GetCurrentLoggers().Length == 0)
        {
            string path = AppDomain.CurrentDomain.BaseDirectory.ToString();
            string configFile = path + "log4net.config";
            log4net.Config.XmlConfigurator.Configure(new FileInfo(configFile));
        }
        logger = log4net.LogManager.GetLogger("pagina");
        logger.Info("Begin processing.");
    }
    #endregion
}
